#ifndef MIXERWIDGET_H
#define MIXERWIDGET_H

#include "mixerbutton.h"
#include "xx/typedef.h"

class MixerWidget : public AGroupBox
{
    Q_OBJECT
public:
    explicit MixerWidget(QWidget *parent = nullptr);
signals:
    void writeMixer(uint8_t out, uint8_t mus, const stDataMixer &value);
public slots:
    void refresh();
    void inputNameUpdated();
    void outputNameUpdated();
private slots:
    void stateChanged(uint8_t out, uint8_t mus, uint8_t vol);
private:
    QVector<ALabel *> m_inputs;
    QVector<ALabel *> m_outputs;
    QVector<QVector<MixerButton *>> m_mixers;
};

#endif // MIXERWIDGET_H
